package com.sskj.run.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.run.bean.BankersMainBean;
import com.sskj.run.http.HttpConfig;
import com.sskj.run.ui.fragment.BankerJackpotMainFragment;


public class BankerJackpotMainFragmentPresenter extends BasePresenter<BankerJackpotMainFragment> {
    /**
     * 涨价奖池-主页
     *
     * @param moneyType 币种
     */
    public void getBankerPoolMainMsg(String moneyType) {
        httpService.bankerPoolMain(moneyType)
                .tag(this)
                .execute(new JsonCallBack<HttpData<BankersMainBean>>(this) {
                    @Override
                    public void onSuccess(Response<HttpData<BankersMainBean>> response) {
                        HttpData httpData = response.body();
//                        ToastUtil.showShort(httpData.msg);
                        if (httpData.getStatus() == HttpConfig.OK) {
                            mView.updataUi((BankersMainBean) httpData.getData());
                        }
                    }
                });
    }

}
